package org.yscz.exception;

import lombok.Data;
import org.yscz.common.enums.UserResponseEnum;

/**
 * @author achen
 * @create 2021-08-16 13:53
 */
@Data
public class CustomUserException extends RuntimeException {
    private Integer code;
    private String msg;

    public CustomUserException(Integer code,String msg) {
        super();
        this.code = code;
        this.msg = msg;
    }

    public CustomUserException(UserResponseEnum userResponseEnum) {
        super();
        this.code = userResponseEnum.getCode();
        this.msg = userResponseEnum.getMsg();
    }
}
